

/**
 * 水面材质
 */
import BlueWaterMaterialShader from '../shader/water/BlueWaterMaterialShader.glsl?raw'
import FlowWaterMaterialShader from '../shader/water/FlowWaterMaterialShader.glsl?raw'
import WaveWaterMaterialShader from '../shader/water/WaveWaterMaterialShader.glsl?raw'

/**
 *  蓝色的水
 */
Cesium.Material.BlueWaterMaterialType = 'BlueWater'
Cesium.Material._materialCache.addMaterial(Cesium.Material.BlueWaterMaterialType, {
  fabric: {
    type: Cesium.Material.BlueWaterMaterialType,
    uniforms: {
      
    },
    source: BlueWaterMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 流动水面
 */
import iChannel0 from '../image/water/Water_1_M_Normal.jpg'
import iChannel1 from '../image/water/movingRiver.png'

Cesium.Material.FlowWaterMaterialType = 'FlowWater'
Cesium.Material._materialCache.addMaterial(Cesium.Material.FlowWaterMaterialType, {
  fabric: {
    type: Cesium.Material.FlowWaterMaterialType,
    uniforms: {
      iChannel0,
      iChannel1,
      speed :3.0
    },
    source: FlowWaterMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 波浪水面
 */

Cesium.Material.WaveWaterMaterialType = 'WaveWater'
Cesium.Material._materialCache.addMaterial(Cesium.Material.WaveWaterMaterialType, {
  fabric: {
    type: Cesium.Material.WaveWaterMaterialType,
    uniforms: {
      speed :3.0
    },
    source: WaveWaterMaterialShader
  },
  translucent: function (material) {
    return true
  }
})